home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / Help / Help Files / System files / HelpToStrict < prev    next >
Text File  |  1994-06-24  |  812b  |  20 lines

  1. {•••••••• Some code to turn Help into a really strict language •••••••••}
  2. {•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••}
  3. {•••NB: You should also paste the "Strict.res" ressources in "Paresseux"}
  4.  
  5. {••• First of all, let's modify lambda }
  6. (coerce 'lambda 6)         ;turns lambda into a normal symbol
  7. (=! system:lambda lambda)  ;get lambda code in system:lambda symbol
  8. (defmacro (lambda | l)
  9.   `(setstrict (system:lambda ,@l) %1111111111111111))
  10.                            ;lambda creates now strict closures !
  11. (coerce 'system:lambda 10) ;turns system:lambda into a keyword
  12.  
  13. {••• Now define…}
  14. (coerce 'define 6)
  15. (=! system:define define)
  16. (defmacro (define f | b)
  17.   (cond (cons? f) `(system:define ,(0 f) (lambda ,(-1 f) ,@b))
  18.         `(system:define ,f ,@b)))
  19. (coerce 'system:define 10)
  20.